package dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import pojo.Manager;

public class RoomConditionDao {
	public RoomConditionDao(){
	}
	
	public List<String> selectRoomCondidion(){
		ConnectDao connectDao = new ConnectDao();
		List<String> list = new ArrayList<String>();
		String sql = "SELECT roomNum FROM room WHERE status = '1'";
		try{
			ResultSet rs = connectDao.stat.executeQuery(sql);
			while(rs.next()){
				list.add(rs.getString("roomNum"));
			}
		}catch(SQLException e){
			e.printStackTrace();
			connectDao.closeConnect();
			return null;
		}
		connectDao.closeConnect();
		return list;
		
	}
}
